#!/bin/sh

PREREQ="udev"

prereqs()
{
	echo "$PREREQ"
}

case $1 in
prereqs)
	prereqs
	exit 0
	;;
esac

. /usr/share/initramfs-tools/hook-functions

if   [ -e /etc/udev/rules.d/69-bcache.rules ]; then
    cp -pt "${DESTDIR}/lib/udev/rules.d" /etc/udev/rules.d/69-bcache.rules
elif [ -e /lib/udev/rules.d/69-bcache.rules ]; then
    cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/69-bcache.rules
fi

copy_exec /lib/udev/bcache-register
copy_exec /lib/udev/probe-bcache
manual_add_modules bcache
